<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>

<html>
<head>
    <title>待发证</title>
    <link rel="stylesheet" href="${ctx}/static/passport/css/approvallist.css">
    <link rel="stylesheet" href="${ctx}/static/passport/css/approvallist_bootstrap.css">
</head>

<body>
<div class="content">
    <div class="page-subcate-list" >
        <div class="page-subcate-item" >
            <div class="form-item">
                <label>证件号</label>
                <input type="text" class="form-control" id="cardNO" placeholder="" value="">
            </div>
            <div class="form-item">
                <label>订单号</label>
                <input type="text" class="form-control" id="num" placeholder="" value="">
            </div>
            <div class="form-item">
                <label>手机号</label>
                <input type="text" class="form-control" id="mobile" placeholder="" value="">
            </div>
            <div class="form-item">
                <!--
                <button  class="pull-left btn">查询</button>
                <button onclick="javascript:send('${data.id}');" class="pull-left btn">发证</button>
                <button onclick="javascript:toback('${data.id}');" class="pull-left btn">退回制证部门</button>
                -->
                <div class="col-lg-3">
                    <button type="button" class="btn btn-primary btn-default btn-sm btn-block" onclick="javascript:search();">查询</button>
                </div>
                <div class="col-lg-3">
                    <button type="button" class="btn btn-primary btn-default btn-sm btn-block" data-toggle="modal" data-target="#myModal">发证</button>
                </div>
                <div class="col-lg-3">
                    <button type="button" class="btn btn-primary btn-default btn-sm btn-block" data-toggle="modal" data-target="#myModal2">退回制证部门</button>
                </div>

            </div>
        </div>
    </div>
    <table class="table table-bordered">
        <thead>
        <tr>
            <th>订单</th>
            <th>姓名</th>
            <th>性别</th>
            <th>证件号</th>
            <th>手机</th>
        </tr>
        </thead>
        <tbody>
            <tr id="TR_${data.id}">
                <td>${data.num}</td>
                <td>${data.name}</td>
                <td>${data.sex}</td>
                <td>${data.cardNO}</td>
                <td>${data.mobile}</td>
            </tr>
        </tbody>
    </table>
</div>


<script type="text/javascript">
    function search()
    {
        var cardNO = $('#cardNO').val();
        var num = $('#num').val();
        var mobile = $('#mobile').val();
        var param = "cardNO="+cardNO +"&num="+num+"&mobile="+mobile;
        window.location.href="${ctx}/passport/finshed/search?"+param;
    }
    function send(id)
    {
        if(id == "")
            return;

        var url ="${ctx}/passport/updateStatus";
        $.post(url,{"id":id,"status":30},function(data)
        {
            if(data.code == 0)
            {
                window.location.reload();
            }
        },"json");
    }
</script>


<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="passport_certidetail_wrapper modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                <h4 class="modal-title" id="myModalLabel"></h4>
            </div>
            <div class="modal-body">
                <p class='text-center'>用户是否已确认信息无误？</p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="button" class="approlist_save_item btn btn-primary" onclick="javascript:send('${data.id}');">确定</button>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="passport_certidetail_wrapper modal-dialog">
        <div class="modal-content modal-lg">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                <h4 class="modal-title" id="myModalLabel"></h4>
            </div>
            <div class="modal-body">
                <div class="personal_information_box">
                    <p>原护照申请信息</p>
                    <div class="personal_information_box1">

                        <dl class="dl-horizontal lead ">
                            <dt>姓名</dt>
                            <dd id="native_name">张三</dd>
                            <dt>性别</dt>
                            <dd id="native_sex">男</dd>
                            <dt>证件类型</dt>
                            <dd id="native_card">身份证</dd>
                            <dt>证件编号</dt>
                            <dd id="native_ID">121212121212121212</dd>
                            <dt>出生日期</dt>
                            <dd id="native_birth">19950505</dd>
                        </dl>
                    </div>
                </div>

                <div class="personal_information_box">
                    <p>修改后护照信息</p>

                    <div class="personal_information_box1">
                        <form class="form-horizontal" role="form">
                            <input type="hidden" id="orderID" value="${data.id}">
                            <label for="firstname" class="col-lg-4 control-label">姓名</label>
                            <div class="col-lg-6">
                                <input type="text" placeholder="请输入姓名" class="form-control" id="update_name">
                            </div>
                            <label class="col-lg-4 control-label">性别</label>
                            <div id="update_sex">
                                <div class="col-lg-3">
                                    <label class="radio-inline">
                                        <input type="radio" name="gender" value="man">男
                                    </label>
                                </div>
                                <div class="col-lg-2">
                                    <label class="radio-inline">
                                        <input type="radio" name="gender" value="woman"> 女
                                    </label>
                                </div>
                            </div>
                            <label class="col-lg-4 control-label">证件类型</label>
                            <div class="col-lg-6">
                                <select class="form-control " id="update_card">
                                    <option value="0">身份证</option>
                                </select>
                            </div>
                            <label for="firstname" class="col-lg-4 control-label">证件编号</label>
                            <div class="col-lg-6">
                                <input type="text" placeholder="请输入证件编号" class="form-control" id="update_ID">
                            </div>
                            <label for="firstname" class="col-lg-4 control-label">出生日期</label>
                            <div class="col-lg-6">
                                <input type="text" placeholder="请输入出生日期" class="form-control"  id="update_birth">
                            </div>
                        </form>
                    </div>
                </div>
            </div>
            <div class="modal-footer personal_information_button">
                <button type="button" class="btn btn-default btn-primary" data-dismiss="modal">取消</button>
                <button type="button" class="approlist_save_item2 btn btn-primary" id="summit_OK" >确定</button>
            </div>
        </div>
    </div>
</div>



</body>
</html>
